package com.example.demo.service.impl;

import com.example.demo.entity.Relics;
import com.example.demo.mapper.RelicsMapper;
import com.example.demo.service.RelicsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RelicsServiceImpl implements RelicsService {

    @Autowired
    private RelicsMapper relicMapper;

    // 模糊搜索文物
    public List<Relics> searchRelics(String keyword) {
        return relicMapper.searchRelics(keyword);
    }

    // 获取所有文物列表
    public List<Relics> getAllRelics() {
        return relicMapper.getAllRelics();
    }

    // 获取文物详情
    public Relics getRelicDetail(int id) {
        return relicMapper.getRelicDetail(id);
    }


}
